package org.jeecg.modules.demo.staffstockholder.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.demo.staffstockholder.entity.StaffStockholder;
import org.jeecg.modules.demo.staffstockholder.mapper.StaffStockholderMapper;
import org.jeecg.modules.demo.staffstockholder.service.IStaffStockholderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class StaffStockholderServiceImpl extends ServiceImpl<StaffStockholderMapper, StaffStockholder> implements IStaffStockholderService {
    @Autowired
    private StaffStockholderMapper staffStockholderMapper;

    /**
     * 查询员工股东
     */
    @Override
    public IPage<StaffStockholder> queryStaffStockholder(Page<StaffStockholder> page, String staffId, String stockholderName) {

        return staffStockholderMapper.queryStaffStockholder(page, staffId, stockholderName);
    }

    @Override
    public void deleteByStockholderId(String stockholderId) {
        staffStockholderMapper.deleteByStockholderId(stockholderId);
    }
}
